package cn.dapeng.designPatterns.command.t2;

public class OpenCommand implements Command {
    private TextEditor editor;
    private String fileName;

    public OpenCommand(TextEditor editor, String fileName) {
        this.editor = editor;
        this.fileName = fileName;
    }

    @Override
    public void execute() {
        editor.openFile(fileName);
    }
}




